Mode
Sets a mode for a block. The values this property can take are defined in the include file.
Take care when changing modes: you may unintentionally lock down a screen if the conditions you specify are not precise.
Property values
- 0 or View. Sets the mode to View.
- 1 or Edit. Sets the mode to Edit.
- 2 or Save. Sets the mode to Save.
Examples
if (CRM.Mode < Edit)
{
CRM.Mode = Edit;
}
Changes the mode to Edit if the current mode is View.
CRM.Mode = Edit;
if (error!="")
{
CRM.Mode = Save;
CRM.AddContent(error);
Response.Write(CRM.GetPage());
}
Changes the mode to Save if an error has occurred. Also displays the error.